********************DATA PREP********************
cd "C:\RCFS Data"
set more off

use "SIXout_p_dummy.dta", clear
replace sim=sim+100
append using "SIXout_v_dummy.dta"
replace sim=sim+100
append using "SIXout_l_dummy.dta"
replace sim=sim+100
append using "SIXout_i_dummy.dta"
replace sim=sim+100
append using "SIXout_d_dummy.dta"
replace sim=sim+100
append using "SIXout_c_dummy.dta"
replace sim=sim+100
append using "SIXout_p_dummy ffe.dta"
replace sim=sim+100
append using "SIXout_v_dummy ffe.dta"
replace sim=sim+100
append using "SIXout_l_dummy ffe.dta"
replace sim=sim+100
append using "SIXout_i_dummy ffe.dta"
replace sim=sim+100
append using "SIXout_d_dummy ffe.dta"
replace sim=sim+100
append using "SIXout_c_dummy ffe.dta"
replace sim=sim+100

gen one2sd=abs(coeff/depvarsd)
gen one2mean=abs(coeff/depvarmean)

collapse (max) one2sd_max=one2sd one2mean_max=one2mean, by(sim)

replace one2mean_max=1 if one2mean_max>1

gen neg_one2sd_max=-one2sd_max
cumul neg_one2sd_max, gen(one2sd_freq)

gen neg_one2mean_max=-one2mean_max
cumul neg_one2mean_max, gen(one2mean_freq)

replace one2mean_freq=one2mean_freq*100
replace one2sd_freq=one2sd_freq*100

line one2mean_freq one2mean_max, sort xtitle("Max economic significance (across methodologies)") ytitle("Percent") xscale(range(0 1)) || line one2sd_freq one2sd_max, sort lpattern(dash) title("Panel C: Δy for a zero-to-one Δx") subtitle("Dummy explanatory variables") legend(order(1 "Scaled by mean of y" 2 "Scaled by s.d. of y" ))

